<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input id="id" name="id" th:value="${loanApply.id}" type="hidden">
                        <input type="hidden" id="realname" th:value="${loanApply.realName}">
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><span style="color:red">当前</span>申请金额：</label>
                            <div style="top: 8px;" class="col-sm-8" th:text="${loanApply.applyAmount}"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><span style="color:red">当前</span>放款金额：</label>
                            <div style="top: 8px;" class="col-sm-8" th:text="${loanApply.loanAmount}"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><span style="color:red">当前</span>借款利息：</label>
                            <div style="top: 8px;" class="col-sm-8" th:text="${loanApply.remark1}"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><span style="color:red">当前</span>还款方式：</label>
                            <div style="top: 8px;" class="col-sm-8" th:text="${loanApply.remark9}"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><span style="color:red">当前</span>借款已还：</label>
                            <div style="top: 8px;" class="col-sm-8" th:text="${loanApply.remark2}"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><span style="color:red">当前</span>借款应还：</label>
                            <div style="top: 8px;" class="col-sm-8" th:text="${loanApply.remark3}"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><span style="color:red">当前</span>贷款产品：</label>
                            <div style="top: 8px;" class="col-sm-8" th:text="${loanApply.loanProductName}"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><span style="color:red">当前</span>贷款期间：</label>
                            <div style="top: 8px;" class="col-sm-8" th:text="${loanApply.loanPeriod}"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><span style="color:red">当前</span>贷款利率：</label>
                            <div style="top: 8px;" class="col-sm-8" th:text="${loanApply.loanRate}"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><span style="color:red">当前</span>还款时间：</label>
                            <div style="top: 8px;" class="col-sm-8" th:text="${loanApply.remark4}"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><span style="color:red">当前</span>放款时间：</label>
                            <div style="top: 8px;" class="col-sm-8" th:text="${loanApply.remark5}"></div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>

<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js"></script>
<!--以上两个文件是js把html转pdf文件的两个库 -->
<script>
    $(function () {
        downloadresume();
        var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
        parent.layer.close(index);
    });

    //html文件转成pdf格式文件函数
    function downloadresume() {
        var pdf = new jsPDF('p', 'pt', 'a4');
        pdf.internal.scaleFactor = 1;
        var options = {
            pagesplit: true
        };
        //$('.pdf-wrapper')
        pdf.addHTML($(".gray-bg"), options, function () {
            console.log(pdf);
            pdf.save($("#realname").val() + '借款详情.pdf');
        });
    }
</script>

</body>
</html>
